import java.util.Random;

public class employee {
    public static void main(String[] args) {
        String[] id={"00001","010008","020010","020018","102201","102208","108991","111006","210678","302566","308759","504209"};
        String[] name={"王琳","吴荣华","王相容","丽丽","刘明","朱军","钟敏","张世兵","凌涛","李玉敏","叶凡","陈玲玲"};
        String[] education={"大专","本科","硕士","大专","本科","硕士","大专","本科","硕士","大专","本科","硕士"};
        String[] birthday={"1966-01-23","1976-01-23","1996-03-23","1986-01-20","1986-01-23","1996-01-23","1996-01-23","1997-01-23","1996-01-23","1996-01-23","1996-01-23","1996-01-23"};
        int[] sex={1,1,1,0,1,1,1,0,1,1,1,0};
        int[] workTime=new int[12];
        for (int i = 0; i < 12; i++) {
            workTime[i]=(int)(Math.random()*9)+1;
        }
        String[] address={"中山路32-1-508","北京东路100-2","四排路 10-0-108","解放路","中山路32-1-508","北京东路100-2","四排路 10-0-108","解放路","中山路32-1-508","北京东路100-2","四排路 10-0-108","解放路"};
        StringBuilder phoneNum=new StringBuilder();
        for (int i = 0; i < 12; i++) {
            phoneNum.append(randomNum());
            phoneNum.append(" ");
        }
        String[] ph={};
        String phone=phoneNum.toString();
        for (int i = 0; i < phone.length(); i++) {
            ph=phone.split(" ");
        }
        for (int i = 0; i < ph.length; i++) {
            System.out.println(ph[i]);
        }

        int[] department=new int[12];
        for (int i = 0; i < 12; i++) {
            department[i]=(int)(Math.random()*4)+1;
        }
        for (int i = 0; i < 12; i++) {
            System.out.println(department[i]);
        }

        System.out.println("INSERT INTO Employees");
        for (int i = 0; i < 12; i++) {
            System.out.println("('"+id[i]+"',"
                    +"'"+name[i]+"',"
                    +"'"+education[i]+"',"
                    +"'"+birthday[i]+"',"
                    +"'"+sex[i]+"',"
                    +workTime[i]+","
                    +"'"+address[i]+"',"
                    +"'"+ph[i]+"',"
                    +"'"+department[i]+"'"
                    + "),");
        }
    }
    public static String randomNum(){
        Random random=new Random();
        StringBuilder sb=new StringBuilder();
        sb.append("8");
        sb.append(random.nextInt(3)+1);
        for (int i = 0; i < 7; i++) {
            sb.append(random.nextInt(10));
        }
        return sb.toString();
    }

}
